#ifndef YUAN_PTHREAD_H
#define YUAN_PTHREAD_H

#include "MQTTClient.h"
#include "yuan_mqtt.h"

extern MQTTClient yuan_pub_client;
extern MQTTClient yuan_sub_client;
extern void* shm_addr;
extern int yuan_quit;


// 线程函数（内部实现，外部无需直接调用）
void* yuan_shm_read_thread(void* arg);
void* yuan_mqtt_public_thread(void* arg);
void* yuan_mqtt_subscribe_thread(void* arg);

int create_yuan_threads(pthread_t* t1, pthread_t* t2,pthread_t* t3); // 创建收发线程

#endif